﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace UIWindows.GlobalStatics
{
    /// <summary>
    /// 全局静态变量
    /// </summary>
    public static class GlobalStatic
    {
        private static string _path = Environment.CurrentDirectory;

        public static string Log4NetPath { get => $"{_path}\\log4net.config"; }
        public static string ConfigPath { get => $"{_path}\\config"; }
        public static string DevicePath { get => $"{ConfigPath}\\device.txt"; }
        public static string ST5520Path { get => $"{ConfigPath}\\DeviceInit\\ST5520.txt"; }
        public static string RJ6902RPath { get => $"{ConfigPath}\\DeviceInit\\RJ6902R.txt"; }
        public static string RJ6902CAGXPath { get => $"{ConfigPath}\\DeviceInit\\RJ6902CAGX.txt"; }
        public static string ParameterPath { get => $"{ConfigPath}\\parameter.txt"; }
        public static string MesParameterPath { get => $"{ConfigPath}\\MesParameter.txt"; }
        public static string DeviceInteractiveaddressPath { get => $"{ConfigPath}\\DeviceInteractiveaddressPath.txt"; }
        public static string HomePath { get => $"{ConfigPath}\\home.txt"; }
        public static string SystemConfigPath { get => $"{ConfigPath}\\systemconfig.txt"; }
        public static string TopicsPath { get => $"{ConfigPath}\\topics.txt"; }
        public static string UserPath { get => $"{ConfigPath}\\user.txt"; }
        public static string RolePath { get => $"{ConfigPath}\\role.txt"; }
        public static string ExportDataPath { get => $"{Environment.CurrentDirectory.Substring(0, 2)}\\Export"; }
        public static string YieldPath { get => $"{ConfigPath}\\yield.txt"; }
        public static string EquipmentTimePath { get => $"{ConfigPath}\\equipmentTime.txt"; }
        public static string ChartDataPath { get => $"{_path}\\chartDataPath.txt"; }
        public static string EquipmentFilePath { get => $"{_path}\\logs\\EquipmentTimeLog"; }
        public static string RoleInitPath { get => $"{_path}\\config\\roleinit.txt"; }
        public static string DisplayItemPath { get => $"{_path}\\config\\displayitem.txt"; }


        public static string CoilCoreLoadingDataDisplayItemPath { get => $"{_path}\\config\\CoilCoreLoadingDataDisplayItem.txt"; }
        public static string CupSleeveChangingDataDisplayItemPath { get => $"{_path}\\config\\CupSleeveChangingDataDisplayItem.txt"; }
        public static string PoleEarFoldingDataDisplayItemPath { get => $"{_path}\\config\\PoleEarFoldingDataDisplayItem.txt"; }
        public static string ShellInsertionDataDisplayItemPath { get => $"{_path}\\config\\ShellInsertionDataDisplayItem.txt"; }
        public static string SpotoWeldDataDisplayItemPath { get => $"{_path}\\config\\SpotoWeldDataDisplayItem.txt"; }
        public static string GrooveRollingMachineDataDisplayItemPath { get => $"{_path}\\config\\GrooveRollingMachineDataDisplayItem.txt"; }
        public static string ShortCircuitTesterDataDisplayItemPath { get => $"{_path}\\config\\ShortCircuitTesterDataDisplayItem.txt"; }
        public static string TrayFillerLeftDataDisplayItemsPath { get => $"{_path}\\config\\TrayFillerLeftDataDisplayItems.txt"; }
        public static string TrayFillerRightDataDisplayItemsPath { get => $"{_path}\\config\\TrayFillerRightDataDisplayItems.txt"; }

        public static string PlateDataDisplayItemsPath { get => $"{_path}\\config\\PlateDataDisplayItems.txt"; }
        public static string CleaningDataDisplayItemsPath { get => $"{_path}\\config\\CleaningDataDisplayItems.txt"; }

        public static string MantleDataDisplayItemsPath { get => $"{_path}\\config\\MantleDataDisplayItems.txt"; }
        public static string MarkingDataDisplayItemsPath { get => $"{_path}\\config\\MarkingDataDisplayItems.txt"; }


        public static string DismantlingDiscLeftDataDisplayItemsPath { get => $"{_path}\\config\\DismantlingDiscLeftDataDisplayItems.txt"; }
        public static string DismantlingDiscRightDataDisplayItemsPath { get => $"{_path}\\config\\DismantlingDiscRightDataDisplayItems.txt"; }


        public static string CapWeldingDataDisplayItemsPath { get => $"{_path}\\config\\CapWeldingDataDisplayItems.txt"; }
        public static string SealingMachineDataDisplayItemsPath { get => $"{_path}\\config\\SealingMachineDataDisplayItems.txt"; }

        public static string FaceCushionDataDisplayItemsPath { get => $"{_path}\\config\\FaceCushionDataDisplayItemsItems.txt"; }


        public static string PlateScanBarcodePath { get => $"{_path}\\config\\PlateScanBarcode.txt"; }



        public static string DisplayItemPath2 { get => $"{_path}\\config\\displayitem2.txt"; }
        public static string DES_KEY { get => "12560695"; }
        public static string DES_IV { get => "k164s453"; }

        public static bool IsDeBug { get; } = false;

        public static int DBReadNumber { get => 200; }
        public static int DBWriteNumber { get => 200; }

        public static int StructureSize { get; set; } = 74;//基恩士为39

        public static System.Text.Json.JsonSerializerOptions Options
        {
            get => new System.Text.Json.JsonSerializerOptions
            {
                Encoder = System.Text.Encodings.Web.JavaScriptEncoder.UnsafeRelaxedJsonEscaping,
                AllowTrailingCommas = true,//获取或设置一个值，该值指示要反序列化的 JSON 有效负载中是否允许（和忽略）对象或数组中 JSON 值的列表末尾多余的逗号。
                WriteIndented = true//美观
            };
        }

        public static int BooleanCount { get; set; }
    }
}
